/*******************************************************************************
  * Copyright(c) 2023 Levetop Semiconductor Co.,Led. All rights reserved.
  * @file     uiEncoder.h
  * @author   UartTFT Application Team
  * @version  V0.0.1
  * @date     2023-01-04
  * @brief    This file contains the functions prototypes for the UartTFT
  *           Application display firmware.
 ********************************************************************************/

#ifndef UIENCODER_H_
#define UIENCODER_H_
#include "type.h"
#include "module_select.h"

typedef struct
{
	uint16_t num; // Overlapped pictures
	uint16_t numflag;
	uint16_t pic[50];	// Overlapped picture sequence number
	uint16_t value[50]; // overlap
	uint16_t picselect;

} LT_ENCODER_;
extern LT_ENCODER_ LT_encoder;

extern uint16_t gEncoder_addr[];
extern uint8_t gEncoder_num;
extern uint8_t gEncoderFlag;
extern uint8_t gEncoder_old_value;
extern uint16_t gEncoder_old_icon;
extern uint16_t gEncoder_old_x;
extern uint16_t gEncoder_old_y;

extern uint16_t Check_box_add;
extern uint8_t Check_box_flag;
extern uint8_t Encoder_num;
extern uint8_t Encoder_read_Flag, Encoder_Freetime;
extern uint8_t knob_dir, SW_flag, Enc0, Enc1, SW_flag4, key_time;
extern uint16_t Encoder_time;
extern uint8_t Double_click_interval;
extern uint8_t Long_press, Encoder_type;

extern uint8_t colour_flag;
extern int warmBlast_flag;
extern int warmlight_flag;
extern int coldBlast_flag;
extern int coldlight_flag;

extern int warmBlast_Mode;
extern int warmlight_Mode;
extern int coldBlast_Mode;
extern int coldlight_Mode;

#define colour_sAddr 0x6007f000+0
#define warmBlast_sAddr 0x6007f000+1
#define warmlight_sAddr 0x6007f000+2
#define coldBlast_sAddr 0x6007f000+3
#define coldlight_sAddr 0x6007f000+4
#define warmBlast_Mode_sAddr 0x6007f000+5
#define warmlight_Mode_sAddr 0x6007f000+6
#define coldBlast_Mode_sAddr 0x6007f000+7
#define coldlight_Mode_sAddr 0x6007f000+8
#define name_sAddr 0x6007f000+9
#define WR_SIZE 9+20

#define colour_A 1//1:Ϊůɫ. 2��Ϊ��ůɫ


extern uint16_t JiYi_time;
extern uint8_t JiYi_flag;


/*encoder*/
extern void Display_encoder(uint8_t *buff, uint8_t type);
extern void get_encoder(uint8_t type, uint8_t *buff, uint16_t addr);
extern void encoder(void);
#endif /* UIENCODER_H_ */
